<?php 
/**
 * User-View: `change_avatar`
 *
 * PHP versions 4 and 5
 *
 * TutoriumBase (http://tutoriumbase.my-reality.de)
 * Copyright 2012, Miguel Gonzalez (http://my-reality.de)
 *
 *
 * @copyright     Copyright 2012, Miguel Gonzalez (http://my-reality.de)
 * @link          http://tutoriumbase.my-reality.de TutoriumBase
 * @since         TutoriumBase v 0.1
 */
echo '<div class="box">';
if (isset($caption)) {
  echo $this->Layout->generateMainCaption($caption);
}

echo $form->create('User', array('action' => 'change_avatar/' . $user['id'])); 
echo $form->input('avatar', array('type'=>'file')); 

echo '<div id="bottom_buttons">';
echo '<div id="left_button">' . $this->Html->link('Zurueck zum Profil', 
                       array('controller' => 'users', 'action' => 'view/' . $user['id']), 
                       array('class' => 'button_blue', 'escape' => false)) . '</div>';
echo '<div id="right_button">' . $form->submit('Avatar aendern', 
                   array('class' => 'button_green', 'escape' => false)) . '</div>';
echo '</div>';
echo $form->end(); 
echo '</div>';?>

